package com.zjcode.cdcer.service.fallback;

import com.chinatechstar.component.commons.result.ListResult;
import com.chinatechstar.component.commons.result.ResultBuilder;
import com.chinatechstar.component.commons.supports.PageData;
import com.zjcode.cdcer.model.basic.JsonObj;
import com.zjcode.cdcer.service.ArticleInfoService;
import org.springframework.stereotype.Service;

/**
 * @ClassName:ArticleInfoServiceFallback
 * @功能：
 * @author：wlei
 * @日期：2022/9/3-18:17
 **/
@Service
public class ArticleInfoServiceFallback implements ArticleInfoService {

    @Override
    public JsonObj createArticleInfo(PageData pageData) {
        return JsonObj.error("服务异常");
    }

    @Override
    public JsonObj updateArticleInfo(PageData pageData) {
        return JsonObj.error("服务异常");
    }

    @Override
    public JsonObj deleteById(PageData pageData) {
        return JsonObj.error("服务异常");
    }

    @Override
    public JsonObj listLatestArticles(PageData pageData) {
        return JsonObj.error("服务异常");
    }

    @Override
    public ListResult<Object> listByPage(PageData pageData) {
        return ResultBuilder.buildListWarn(new Exception("服务异常"));
    }
}
